import { developmentUrl } from "../config/env";
import request from "../config/axios";

export const getList = (params) => request({
    url: `${developmentUrl}/cfg/list`,
    method: 'get',
    params
})

export const getByPrefix = (params) => request({
    url: `${developmentUrl}/cfg/getByPrefix`,
    method: 'get',
    params
})

export function saveGroup(params) {
    request({
        url: `${developmentUrl}/cfg/saveGroup`,
        method: 'post',
        params
    })
}

export const exportXls=(params)=>
    request({
        url: `${developmentUrl}/cfg/export`,
        method: 'GET',
        params,
        responseType:'blob',
    })
 
export function save(params) {
    return request({
        url: `${developmentUrl}/cfg`,
        method: 'post',
        params
    })
}

export function remove(id) {
    request({

        url: `${developmentUrl}/cfg`,
        method: 'delete',
        params: {
            id: id
        }
    })
}
